# Maintainer: Lukas Fleischer <lfleischer@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Paul Mattal <paul@archlinux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>

pkgname=ncftp
pkgver=3.2.6
pkgrel=1
pkgdesc="A set of free application programs implementing FTP"
url="http://www.ncftp.com/"
arch=('x86_64')
license=('custom')
depends=('ncurses')
makedepends=('inetutils')
source=("ftp://ftp.ncftp.com/ncftp/$pkgname-$pkgver-src.tar.xz")
md5sums=('9e42d4696754ed49e002b8f719f07d92')

build() {
  cd "${pkgname}-${pkgver}"

  # FS#39211
  unset CPPFLAGS

  CPP=/usr/bin/cpp ./configure --prefix=/usr --sysconfdir=/etc
  make
}

package() {
  cd "${pkgname}-${pkgver}"

  install -d "${pkgdir}/usr/share"
  make prefix="${pkgdir}/usr" mandir="${pkgdir}/usr/share/man" install
  install -Dm644 doc/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
